{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Python Pandas基础\n",
    "\n",
    "## 产生Pandas对象\n",
    "\n",
    "`pandas` 中有三种基本结构：\n",
    "\n",
    "- `Series`\n",
    "    - 1D labeled homogeneously-typed array\n",
    "- `DataFrame`\n",
    "    - General 2D labeled, size-mutable tabular structure with potentially heterogeneously-typed columns\n",
    "- `Panel`\n",
    "    - General 3D labeled, also size-mutable array"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##  Pandas一维数据结构：Series"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`Series` 是一维带标记的数组结构，可以存储任意类型的数据（整数，浮点数，字符串，`Python` 对象等等）。\n",
    "\n",
    "作为一维结构，它的索引叫做 `index`，基本调用方法为\n",
    "\n",
    "    s = pd.Series(data, index=index)\n",
    "    \n",
    "其中，`data` 可以是以下结构：\n",
    "\n",
    "- 字典\n",
    "- `ndarray`\n",
    "- 标量，例如 `5`\n",
    "\n",
    "`index` 是一维坐标轴的索引列表。\n",
    "\n",
    "如果 `data` 是个 `ndarray`，那么 `index` 的长度必须跟 `data` 一致："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    1.0\n",
       "b    1.0\n",
       "c    1.0\n",
       "d    1.0\n",
       "e    1.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = pd.Series(np.ones(5), index=[\"a\", \"b\", \"c\", \"d\", \"e\"])\n",
    "\n",
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.082435\n",
       "1    0.680241\n",
       "2    0.112977\n",
       "3    0.901835\n",
       "4   -0.603082\n",
       "dtype: float64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series(np.random.randn(5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1    2\n",
       "dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series({1:2,})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 向量化操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "简单的向量操作与 `ndarray` 的表现一致："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    2.0\n",
       "b    2.0\n",
       "c    2.0\n",
       "d    2.0\n",
       "e    2.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s + s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    2.0\n",
       "b    2.0\n",
       "c    2.0\n",
       "d    2.0\n",
       "e    2.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s * 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "但 `Series` 和 `ndarray` 不同的地方在于，\\\n",
    "`Series` 的操作默认是使用 `index` 的值进\\\n",
    "行对齐的，而不是相对位置："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    NaN\n",
       "b    2.0\n",
       "c    2.0\n",
       "d    2.0\n",
       "e    NaN\n",
       "dtype: float64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s[1:] + s[:-1]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对于上面两个不能完全对齐的 `Series`，\\\n",
    "结果的 `index` 是两者 `index` 的并集，\\\n",
    "同时不能对齐的部分当作缺失值处理。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Pandas二维数据结构：DataFrame"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`DataFrame` 是 `pandas` 中的二维数据结构，可以看成一个 `Excel` 中的工作表，或者一个 `SQL` 表，或者一个存储 `Series` 对象的字典。\n",
    "\n",
    "`DataFrame(data, index, columns)` 中的 `data` 可以接受很多数据类型：\n",
    "\n",
    "- 一个存储一维数组，字典，列表或者 `Series` 的字典\n",
    "- 2-D 数组\n",
    "- 结构或者记录数组\n",
    "- 一个 `Series`\n",
    "- 另一个 `DataFrame`\n",
    "\n",
    "`index` 用于指定行的 `label`，`columns` 用于指定列的 `label`，如果参数不传入，那么会按照传入的内容进行设定。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 从 Series 字典中构造"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "d = {'one' : pd.Series([1., 2., 3.], index=['a', 'b', 'c']),\n",
    "     'two' : pd.Series([1., 2., 3., 4.], index=['a', 'b', 'c', 'd'])}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "如果没有传入 `columns` 的值，那么 `columns` 的值默认为字典 `key`，`index` 默认为所有 `value` 中 `index` 的并集。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>two</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   one  two\n",
       "a  1.0  1.0\n",
       "b  2.0  2.0\n",
       "c  3.0  3.0\n",
       "d  NaN  4.0"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(d)\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "如果指定了 `index` 值，`index` 为指定的 `index` 值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>two</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   one  two\n",
       "d  NaN  4.0\n",
       "b  2.0  2.0\n",
       "a  1.0  1.0"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DataFrame(d, index=['d', 'b', 'a'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "如果指定了 `columns` 值，会去字典中寻找，找不到的值为 `NaN`："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>two</th>\n",
       "      <th>three</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>2.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   two three\n",
       "d  4.0   NaN\n",
       "b  2.0   NaN\n",
       "a  1.0   NaN"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DataFrame(d, index=['d', 'b', 'a'], columns=['two', 'three'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['a', 'b', 'c', 'd'], dtype='object')"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['one', 'two'], dtype='object')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 列操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`DataFrame` 可以类似于字典一样对列进行操作："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "a    1.0\n",
       "b    2.0\n",
       "c    3.0\n",
       "d    NaN\n",
       "Name: one, dtype: float64"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"one\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>one</th>\n",
       "      <th>two</th>\n",
       "      <th>three</th>\n",
       "      <th>flag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c</th>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>d</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   one  two  three   flag\n",
       "a  1.0  1.0    1.0  False\n",
       "b  2.0  2.0    4.0  False\n",
       "c  3.0  3.0    9.0   True\n",
       "d  NaN  4.0    NaN  False"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['three'] = df['one'] * df['two']\n",
    "\n",
    "df['flag'] = df['one'] > 2\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 索引和选择"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "基本操作：\n",
    "\n",
    "| Operation\t| Syntax | Result |\n",
    "| ---- | ----- | ---- |\n",
    "| Select column\t| df[col] | Series |\n",
    "| Select row by label | df.loc[label] | Series |\n",
    "| Select row by integer location | df.iloc[loc] | Series |\n",
    "| Slice rows | df[5:10]\t| DataFrame |\n",
    "| Select rows by boolean vector\t| df[bool_vec] | DataFrame |"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Series"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "一维 `Series` 可以用一维列表初始化：\n",
    "\n",
    "默认情况下，`Series` 的下标都是数字（可以使用额外参数指定），类型是统一的。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    1.0\n",
      "1    3.0\n",
      "2    5.0\n",
      "3    NaN\n",
      "4    6.0\n",
      "5    8.0\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "s = pd.Series([1,3,5,np.nan,6,8])\n",
    "\n",
    "print(s)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DataFrame\n",
    "\n",
    "`DataFrame` 则是个二维结构，这里首先构造一组时间序列，作为我们第一维的下标："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n",
      "               '2020-01-05', '2020-01-06'],\n",
      "              dtype='datetime64[ns]', freq='D')\n"
     ]
    }
   ],
   "source": [
    "dates = pd.date_range('20200101', periods=6)\n",
    "\n",
    "print(dates)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "然后创建一个 `DataFrame` 结构："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list('ABCD'))\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "默认情况下，如果不指定 `index` 参数和 `columns`，那么他们的值将用从 `0` 开始的数字替代。\n",
    "\n",
    "除了向 `DataFrame` 中传入二维数组，我们也可以使用字典传入数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "      <th>F</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2020-01-02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3</td>\n",
       "      <td>test</td>\n",
       "      <td>foo</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2020-01-02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3</td>\n",
       "      <td>train</td>\n",
       "      <td>foo</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2020-01-02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3</td>\n",
       "      <td>test</td>\n",
       "      <td>foo</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2020-01-02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3</td>\n",
       "      <td>train</td>\n",
       "      <td>foo</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     A          B    C  D      E    F\n",
       "0  1.0 2020-01-02  1.0  3   test  foo\n",
       "1  1.0 2020-01-02  1.0  3  train  foo\n",
       "2  1.0 2020-01-02  1.0  3   test  foo\n",
       "3  1.0 2020-01-02  1.0  3  train  foo"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame({'A' : 1.,\n",
    "                    'B' : pd.Timestamp('20200102'),\n",
    "                    'C' : pd.Series(1,index=list(range(4)),dtype='float32'),\n",
    "                    'D' : np.array([3] * 4,dtype='int32'),\n",
    "                    'E' : pd.Categorical([\"test\",\"train\",\"test\",\"train\"]),\n",
    "                    'F' : 'foo' })\n",
    "\n",
    "df2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "字典的每个 `key` 代表一列，其 `value` 可以是各种能够转化为 `Series` 的对象。\n",
    "\n",
    "与 `Series` 要求所有的类型都一致不同，`DataFrame` 值要求每一列数据的格式相同："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A           float64\n",
       "B    datetime64[ns]\n",
       "C           float32\n",
       "D             int32\n",
       "E          category\n",
       "F            object\n",
       "dtype: object"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.dtypes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 查看数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 头尾数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`head` 和 `tail` 方法可以分别查看最前面几行和最后面几行的数据（默认为 5）："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "最后 3 行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.tail(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 下标，列标，数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "下标使用 `index` 属性查看："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n",
       "               '2020-01-05', '2020-01-06'],\n",
       "              dtype='datetime64[ns]', freq='D')"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.index"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "列标使用 `columns` 属性查看："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['A', 'B', 'C', 'D'], dtype='object')"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "数据值使用 `values` 查看："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2.02625489e-01,  2.04382129e+00, -2.35233309e+00,\n",
       "         2.81324679e-01],\n",
       "       [ 8.80626878e-01, -2.51620814e-04,  9.83701641e-01,\n",
       "         9.64745957e-01],\n",
       "       [-2.31485369e+00, -3.24244972e-01, -5.88964409e-01,\n",
       "        -1.17068361e+00],\n",
       "       [ 2.05845187e-02,  1.59144198e+00, -9.21369360e-01,\n",
       "        -1.82729440e-01],\n",
       "       [ 4.27980367e-01, -5.68823118e-01, -1.06367143e+00,\n",
       "        -2.86497616e-01],\n",
       "       [-2.20226331e+00, -7.72031107e-01,  1.16563090e+00,\n",
       "         9.05467408e-01]])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 统计数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "查看简单的统计数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>6.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>6.000000</td>\n",
       "      <td>6.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>-0.565092</td>\n",
       "      <td>0.328319</td>\n",
       "      <td>-0.462834</td>\n",
       "      <td>0.085271</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>1.363282</td>\n",
       "      <td>1.190618</td>\n",
       "      <td>1.334297</td>\n",
       "      <td>0.808961</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>-1.702354</td>\n",
       "      <td>-0.507679</td>\n",
       "      <td>-1.028096</td>\n",
       "      <td>-0.260556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>-0.091020</td>\n",
       "      <td>-0.162248</td>\n",
       "      <td>-0.755167</td>\n",
       "      <td>0.049298</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>0.326131</td>\n",
       "      <td>1.193519</td>\n",
       "      <td>0.590535</td>\n",
       "      <td>0.749432</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              A         B         C         D\n",
       "count  6.000000  6.000000  6.000000  6.000000\n",
       "mean  -0.565092  0.328319 -0.462834  0.085271\n",
       "std    1.363282  1.190618  1.334297  0.808961\n",
       "min   -2.314854 -0.772031 -2.352333 -1.170684\n",
       "25%   -1.702354 -0.507679 -1.028096 -0.260556\n",
       "50%   -0.091020 -0.162248 -0.755167  0.049298\n",
       "75%    0.326131  1.193519  0.590535  0.749432\n",
       "max    0.880627  2.043821  1.165631  0.964746"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 转置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2020-01-01 00:00:00</th>\n",
       "      <th>2020-01-02 00:00:00</th>\n",
       "      <th>2020-01-03 00:00:00</th>\n",
       "      <th>2020-01-04 00:00:00</th>\n",
       "      <th>2020-01-05 00:00:00</th>\n",
       "      <th>2020-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>0.880627</td>\n",
       "      <td>-2.314854</td>\n",
       "      <td>0.020585</td>\n",
       "      <td>0.427980</td>\n",
       "      <td>-2.202263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>2.043821</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-0.772031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>1.165631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0.281325</td>\n",
       "      <td>0.964746</td>\n",
       "      <td>-1.170684</td>\n",
       "      <td>-0.182729</td>\n",
       "      <td>-0.286498</td>\n",
       "      <td>0.905467</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   2020-01-01  2020-01-02  2020-01-03  2020-01-04  2020-01-05  2020-01-06\n",
       "A   -0.202625    0.880627   -2.314854    0.020585    0.427980   -2.202263\n",
       "B    2.043821   -0.000252   -0.324245    1.591442   -0.568823   -0.772031\n",
       "C   -2.352333    0.983702   -0.588964   -0.921369   -1.063671    1.165631\n",
       "D    0.281325    0.964746   -1.170684   -0.182729   -0.286498    0.905467"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.T"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 排序"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`sort_index(axis=0, ascending=True)` 方法按照下标大小进行排序，`axis=0` 表示按第 0 维进行排序。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_index(ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>D</th>\n",
       "      <th>C</th>\n",
       "      <th>B</th>\n",
       "      <th>A</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>0.281325</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-0.202625</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.964746</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.880627</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-1.170684</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-2.314854</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>-0.182729</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>0.020585</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>-0.286498</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>0.427980</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>0.905467</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>-2.202263</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   D         C         B         A\n",
       "2020-01-01  0.281325 -2.352333  2.043821 -0.202625\n",
       "2020-01-02  0.964746  0.983702 -0.000252  0.880627\n",
       "2020-01-03 -1.170684 -0.588964 -0.324245 -2.314854\n",
       "2020-01-04 -0.182729 -0.921369  1.591442  0.020585\n",
       "2020-01-05 -0.286498 -1.063671 -0.568823  0.427980\n",
       "2020-01-06  0.905467  1.165631 -0.772031 -2.202263"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_index(axis=1, ascending=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`sort_values(by, axis=0, ascending=True)` 方法按照 `by` 的值的大小进行排序，例如按照 `B` 列的大小："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sort_values(by=\"B\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "虽然 `DataFrame` 支持 `Python/Numpy` 的索引语法，但是推荐使用 `.at, .iat, .loc, .iloc 和 .ix` 方法进行索引。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 读取数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "选择单列数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01   -0.202625\n",
       "2020-01-02    0.880627\n",
       "2020-01-03   -2.314854\n",
       "2020-01-04    0.020585\n",
       "2020-01-05    0.427980\n",
       "2020-01-06   -2.202263\n",
       "Freq: D, Name: A, dtype: float64"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"A\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "也可以用 `df.A`："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-01   -0.202625\n",
       "2020-01-02    0.880627\n",
       "2020-01-03   -2.314854\n",
       "2020-01-04    0.020585\n",
       "2020-01-05    0.427980\n",
       "2020-01-06   -2.202263\n",
       "Freq: D, Name: A, dtype: float64"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.A"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "使用切片读取多行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[0:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`index` 名字也可以进行切片："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"20200101\":\"20200103\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用 `label` 索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`loc` 可以方便的使用 `label` 进行索引："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A   -0.202625\n",
       "B    2.043821\n",
       "C   -2.352333\n",
       "D    0.281325\n",
       "Name: 2020-01-01 00:00:00, dtype: float64"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[dates[0]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "多列数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B\n",
       "2020-01-01 -0.202625  2.043821\n",
       "2020-01-02  0.880627 -0.000252\n",
       "2020-01-03 -2.314854 -0.324245\n",
       "2020-01-04  0.020585  1.591442\n",
       "2020-01-05  0.427980 -0.568823\n",
       "2020-01-06 -2.202263 -0.772031"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[:,['A','B']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "选择多行多列："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B\n",
       "2020-01-02  0.880627 -0.000252\n",
       "2020-01-03 -2.314854 -0.324245\n",
       "2020-01-04  0.020585  1.591442"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['20200102':'20200104',['A','B']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "数据降维："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    0.880627\n",
       "B   -0.000252\n",
       "Name: 2020-01-02 00:00:00, dtype: float64"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc['20200102',['A','B']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "得到标量值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.0438212940625977"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[dates[0],'B']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "不过得到标量值可以用 `at`，速度更快："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "34.5 µs ± 11.4 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n",
      "11.1 µs ± 5.32 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n",
      "2.0438212940625977\n"
     ]
    }
   ],
   "source": [
    "%timeit -n100 df.loc[dates[0],'B']\n",
    "%timeit -n100 df.at[dates[0],'B']\n",
    "\n",
    "print(df.at[dates[0],'B'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用位置索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`iloc` 使用位置进行索引："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "A    0.020585\n",
       "B    1.591442\n",
       "C   -0.921369\n",
       "D   -0.182729\n",
       "Name: 2020-01-04 00:00:00, dtype: float64"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "连续切片："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B\n",
       "2020-01-04  0.020585  1.591442\n",
       "2020-01-05  0.427980 -0.568823"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[3:5,0:2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "索引不连续的部分："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>0.983702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.588964</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-1.063671</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         C\n",
       "2020-01-02  0.880627  0.983702\n",
       "2020-01-03 -2.314854 -0.588964\n",
       "2020-01-05  0.427980 -1.063671"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[[1,2,4],[0,2]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "索引整行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[1:3,:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "整列："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   B         C\n",
       "2020-01-01  2.043821 -2.352333\n",
       "2020-01-02 -0.000252  0.983702\n",
       "2020-01-03 -0.324245 -0.588964\n",
       "2020-01-04  1.591442 -0.921369\n",
       "2020-01-05 -0.568823 -1.063671\n",
       "2020-01-06 -0.772031  1.165631"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[:, 1:3]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "标量值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.0002516208142628678"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[1,1]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "当然，使用 `iat` 索引标量值更快："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9.73 µs ± 4.41 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n",
      "5.48 µs ± 965 ns per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "-0.0002516208142628678"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%timeit -n100 df.iloc[1,1]\n",
    "%timeit -n100 df.iat[1,1]\n",
    "\n",
    "df.iat[1,1]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 布尔型索引"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "所有 `A` 列大于 0 的行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df.A > 0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "只留下所有大于 0 的数值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.281325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D\n",
       "2020-01-01       NaN  2.043821       NaN  0.281325\n",
       "2020-01-02  0.880627       NaN  0.983702  0.964746\n",
       "2020-01-03       NaN       NaN       NaN       NaN\n",
       "2020-01-04  0.020585  1.591442       NaN       NaN\n",
       "2020-01-05  0.427980       NaN       NaN       NaN\n",
       "2020-01-06       NaN       NaN  1.165631  0.905467"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df > 0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "使用 `isin` 方法做 `filter` 过滤："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "      <td>one</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "      <td>one</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "      <td>two</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "      <td>three</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "      <td>four</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "      <td>three</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D      E\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325    one\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746    one\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684    two\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729  three\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498   four\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467  three"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = df.copy()\n",
    "df2['E'] = ['one', 'one','two','three','four','three']\n",
    "\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "      <td>two</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "      <td>four</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D     E\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684   two\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498  four"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2[df2['E'].isin(['two','four'])]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 设定数据的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2020-01-02    1\n",
       "2020-01-03    2\n",
       "2020-01-04    3\n",
       "2020-01-05    4\n",
       "2020-01-06    5\n",
       "2020-01-07    6\n",
       "Freq: D, dtype: int64"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s1 = pd.Series([1,2,3,4,5,6], index=pd.date_range('20200102', periods=6))\n",
    "\n",
    "s1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "像字典一样，直接指定 `F` 列的值为 `s1`，此时以 `df` 已有的 `index` 为标准将二者进行合并，`s1` 中没有的 `index` 项设为 `NaN`，多余的项舍去："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>F</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>-0.202625</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D    F\n",
       "2020-01-01 -0.202625  2.043821 -2.352333  0.281325  NaN\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746  1.0\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684  2.0\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729  3.0\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498  4.0\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467  5.0"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['F'] = s1\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "或者使用 `at` 或 `iat` 修改单个值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>F</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.043821</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D    F\n",
       "2020-01-01  0.000000  2.043821 -2.352333  0.281325  NaN\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746  1.0\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684  2.0\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729  3.0\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498  4.0\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467  5.0"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.at[dates[0],'A'] = 0\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>F</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>0.281325</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>0.964746</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-1.170684</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-0.182729</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-0.286498</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>0.905467</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C         D    F\n",
       "2020-01-01  0.000000  0.000000 -2.352333  0.281325  NaN\n",
       "2020-01-02  0.880627 -0.000252  0.983702  0.964746  1.0\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -1.170684  2.0\n",
       "2020-01-04  0.020585  1.591442 -0.921369 -0.182729  3.0\n",
       "2020-01-05  0.427980 -0.568823 -1.063671 -0.286498  4.0\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  0.905467  5.0"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iat[0, 1] = 0\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "设定一整列："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>F</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>5</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>0.983702</td>\n",
       "      <td>5</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>5</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>0.020585</td>\n",
       "      <td>1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>5</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>5</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>1.165631</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C  D    F\n",
       "2020-01-01  0.000000  0.000000 -2.352333  5  NaN\n",
       "2020-01-02  0.880627 -0.000252  0.983702  5  1.0\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964  5  2.0\n",
       "2020-01-04  0.020585  1.591442 -0.921369  5  3.0\n",
       "2020-01-05  0.427980 -0.568823 -1.063671  5  4.0\n",
       "2020-01-06 -2.202263 -0.772031  1.165631  5  5.0"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[:,'D'] = np.array([5] * len(df))\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "设定满足条件的数值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "      <th>F</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-2.352333</td>\n",
       "      <td>-5</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>-0.880627</td>\n",
       "      <td>-0.000252</td>\n",
       "      <td>-0.983702</td>\n",
       "      <td>-5</td>\n",
       "      <td>-1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>-2.314854</td>\n",
       "      <td>-0.324245</td>\n",
       "      <td>-0.588964</td>\n",
       "      <td>-5</td>\n",
       "      <td>-2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>-0.020585</td>\n",
       "      <td>-1.591442</td>\n",
       "      <td>-0.921369</td>\n",
       "      <td>-5</td>\n",
       "      <td>-3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-05</th>\n",
       "      <td>-0.427980</td>\n",
       "      <td>-0.568823</td>\n",
       "      <td>-1.063671</td>\n",
       "      <td>-5</td>\n",
       "      <td>-4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-06</th>\n",
       "      <td>-2.202263</td>\n",
       "      <td>-0.772031</td>\n",
       "      <td>-1.165631</td>\n",
       "      <td>-5</td>\n",
       "      <td>-5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   A         B         C  D    F\n",
       "2020-01-01  0.000000  0.000000 -2.352333 -5  NaN\n",
       "2020-01-02 -0.880627 -0.000252 -0.983702 -5 -1.0\n",
       "2020-01-03 -2.314854 -0.324245 -0.588964 -5 -2.0\n",
       "2020-01-04 -0.020585 -1.591442 -0.921369 -5 -3.0\n",
       "2020-01-05 -0.427980 -0.568823 -1.063671 -5 -4.0\n",
       "2020-01-06 -2.202263 -0.772031 -1.165631 -5 -5.0"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = df.copy()\n",
    "\n",
    "df2[df2 > 0] = -df2\n",
    "\n",
    "df2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 举例：读取和处理股票信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv('GZMTprice.csv',index_col=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-02</th>\n",
       "      <td>680.16</td>\n",
       "      <td>683.90</td>\n",
       "      <td>670.34</td>\n",
       "      <td>690.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-03</th>\n",
       "      <td>681.62</td>\n",
       "      <td>695.57</td>\n",
       "      <td>679.91</td>\n",
       "      <td>700.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-04</th>\n",
       "      <td>700.95</td>\n",
       "      <td>716.18</td>\n",
       "      <td>698.94</td>\n",
       "      <td>722.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-05</th>\n",
       "      <td>720.00</td>\n",
       "      <td>717.43</td>\n",
       "      <td>707.58</td>\n",
       "      <td>724.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-08</th>\n",
       "      <td>714.19</td>\n",
       "      <td>730.81</td>\n",
       "      <td>714.19</td>\n",
       "      <td>735.06</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close     low    high\n",
       "2018-01-02  680.16  683.90  670.34  690.03\n",
       "2018-01-03  681.62  695.57  679.91  700.95\n",
       "2018-01-04  700.95  716.18  698.94  722.43\n",
       "2018-01-05  720.00  717.43  707.58  724.89\n",
       "2018-01-08  714.19  730.81  714.19  735.06"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-02</th>\n",
       "      <td>680.16</td>\n",
       "      <td>683.90</td>\n",
       "      <td>670.34</td>\n",
       "      <td>690.03</td>\n",
       "      <td>3.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-03</th>\n",
       "      <td>681.62</td>\n",
       "      <td>695.57</td>\n",
       "      <td>679.91</td>\n",
       "      <td>700.95</td>\n",
       "      <td>13.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-04</th>\n",
       "      <td>700.95</td>\n",
       "      <td>716.18</td>\n",
       "      <td>698.94</td>\n",
       "      <td>722.43</td>\n",
       "      <td>15.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-05</th>\n",
       "      <td>720.00</td>\n",
       "      <td>717.43</td>\n",
       "      <td>707.58</td>\n",
       "      <td>724.89</td>\n",
       "      <td>-2.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-08</th>\n",
       "      <td>714.19</td>\n",
       "      <td>730.81</td>\n",
       "      <td>714.19</td>\n",
       "      <td>735.06</td>\n",
       "      <td>16.62</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close     low    high   diff\n",
       "2018-01-02  680.16  683.90  670.34  690.03   3.74\n",
       "2018-01-03  681.62  695.57  679.91  700.95  13.95\n",
       "2018-01-04  700.95  716.18  698.94  722.43  15.23\n",
       "2018-01-05  720.00  717.43  707.58  724.89  -2.57\n",
       "2018-01-08  714.19  730.81  714.19  735.06  16.62"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 增加一列\n",
    "df['diff'] = df['close'] - df['open']\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-02</th>\n",
       "      <td>680.16</td>\n",
       "      <td>683.90</td>\n",
       "      <td>670.34</td>\n",
       "      <td>690.03</td>\n",
       "      <td>3.74</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-03</th>\n",
       "      <td>681.62</td>\n",
       "      <td>695.57</td>\n",
       "      <td>679.91</td>\n",
       "      <td>700.95</td>\n",
       "      <td>13.95</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-04</th>\n",
       "      <td>700.95</td>\n",
       "      <td>716.18</td>\n",
       "      <td>698.94</td>\n",
       "      <td>722.43</td>\n",
       "      <td>15.23</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-05</th>\n",
       "      <td>720.00</td>\n",
       "      <td>717.43</td>\n",
       "      <td>707.58</td>\n",
       "      <td>724.89</td>\n",
       "      <td>-2.57</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-08</th>\n",
       "      <td>714.19</td>\n",
       "      <td>730.81</td>\n",
       "      <td>714.19</td>\n",
       "      <td>735.06</td>\n",
       "      <td>16.62</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close     low    high   diff   earn\n",
       "2018-01-02  680.16  683.90  670.34  690.03   3.74   True\n",
       "2018-01-03  681.62  695.57  679.91  700.95  13.95   True\n",
       "2018-01-04  700.95  716.18  698.94  722.43  15.23   True\n",
       "2018-01-05  720.00  717.43  707.58  724.89  -2.57  False\n",
       "2018-01-08  714.19  730.81  714.19  735.06  16.62   True"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 增加一列\n",
    "df['earn'] = df['diff'] > 0\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-02</th>\n",
       "      <td>680.16</td>\n",
       "      <td>683.90</td>\n",
       "      <td>670.34</td>\n",
       "      <td>690.03</td>\n",
       "      <td>3.74</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-03</th>\n",
       "      <td>681.62</td>\n",
       "      <td>695.57</td>\n",
       "      <td>679.91</td>\n",
       "      <td>700.95</td>\n",
       "      <td>13.95</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-04</th>\n",
       "      <td>700.95</td>\n",
       "      <td>716.18</td>\n",
       "      <td>698.94</td>\n",
       "      <td>722.43</td>\n",
       "      <td>15.23</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-08</th>\n",
       "      <td>714.19</td>\n",
       "      <td>730.81</td>\n",
       "      <td>714.19</td>\n",
       "      <td>735.06</td>\n",
       "      <td>16.62</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-09</th>\n",
       "      <td>730.89</td>\n",
       "      <td>760.34</td>\n",
       "      <td>730.89</td>\n",
       "      <td>760.81</td>\n",
       "      <td>29.45</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close     low    high   diff  earn\n",
       "2018-01-02  680.16  683.90  670.34  690.03   3.74  True\n",
       "2018-01-03  681.62  695.57  679.91  700.95  13.95  True\n",
       "2018-01-04  700.95  716.18  698.94  722.43  15.23  True\n",
       "2018-01-08  714.19  730.81  714.19  735.06  16.62  True\n",
       "2018-01-09  730.89  760.34  730.89  760.81  29.45  True"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['earn']].head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 缺失数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            open  close  low  high  diff earn    E\n",
       "2020-01-01   NaN    NaN  NaN   NaN   NaN  NaN  1.0\n",
       "2020-01-02   NaN    NaN  NaN   NaN   NaN  NaN  1.0\n",
       "2020-01-03   NaN    NaN  NaN   NaN   NaN  NaN  NaN\n",
       "2020-01-04   NaN    NaN  NaN   NaN   NaN  NaN  NaN"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1 = df.reindex(index=dates[0:4], columns=list(df.columns) + ['E'])\n",
    "df1.loc[dates[0]:dates[1],'E'] = 1\n",
    "\n",
    "df1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "丢弃所有缺失数据的行得到的新数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [open, close, low, high, diff, earn, E]\n",
       "Index: []"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.dropna(how='any')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "填充缺失数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>5</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            open  close  low  high  diff  earn    E\n",
       "2020-01-01   5.0    5.0  5.0   5.0   5.0     5  1.0\n",
       "2020-01-02   5.0    5.0  5.0   5.0   5.0     5  1.0\n",
       "2020-01-03   5.0    5.0  5.0   5.0   5.0     5  5.0\n",
       "2020-01-04   5.0    5.0  5.0   5.0   5.0     5  5.0"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.fillna(value=5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "检查缺失数据的位置："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "      <th>E</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2020-01-01</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-02</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-03</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-04</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            open  close   low  high  diff  earn      E\n",
       "2020-01-01  True   True  True  True  True  True  False\n",
       "2020-01-02  True   True  True  True  True  True  False\n",
       "2020-01-03  True   True  True  True  True  True   True\n",
       "2020-01-04  True   True  True  True  True  True   True"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.isnull(df1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 计算操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 统计信息"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "每一列的均值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "open     833.971459\n",
       "close    834.997332\n",
       "low      824.088848\n",
       "high     844.716315\n",
       "diff       1.025873\n",
       "earn       0.487524\n",
       "dtype: float64"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "每一行的均值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2018-01-02    454.861667\n",
       "2018-01-03    462.166667\n",
       "2018-01-04    475.788333\n",
       "2018-01-05    477.888333\n",
       "2018-01-08    485.311667\n",
       "2018-01-09    502.230000\n",
       "2018-01-10    507.660000\n",
       "2018-01-11    503.581667\n",
       "2018-01-12    507.480000\n",
       "2018-01-15    509.928333\n",
       "2018-01-16    502.425000\n",
       "2018-01-17    487.183333\n",
       "2018-01-18    487.706667\n",
       "2018-01-19    485.551667\n",
       "2018-01-22    497.830000\n",
       "2018-01-23    501.401667\n",
       "2018-01-24    496.188333\n",
       "2018-01-25    496.575000\n",
       "2018-01-26    501.516667\n",
       "2018-01-29    483.773333\n",
       "2018-01-30    479.996667\n",
       "2018-01-31    492.440000\n",
       "2018-02-01    491.608333\n",
       "2018-02-02    479.195000\n",
       "2018-02-05    465.101667\n",
       "2018-02-06    460.623333\n",
       "2018-02-07    449.026667\n",
       "2018-02-08    453.960000\n",
       "2018-02-09    439.801667\n",
       "2018-02-12    451.285000\n",
       "                 ...    \n",
       "2020-01-08    725.893333\n",
       "2020-01-09    733.631667\n",
       "2020-01-10    740.748333\n",
       "2020-01-13    748.456667\n",
       "2020-01-14    740.448333\n",
       "2020-01-15    741.976667\n",
       "2020-01-16    739.241667\n",
       "2020-01-17    738.131667\n",
       "2020-01-20    729.310000\n",
       "2020-01-21    718.316667\n",
       "2020-01-22    715.233333\n",
       "2020-01-23    703.100000\n",
       "2020-02-03    666.586667\n",
       "2020-02-04    690.838333\n",
       "2020-02-05    697.835000\n",
       "2020-02-06    711.670000\n",
       "2020-02-07    715.170000\n",
       "2020-02-10    710.963333\n",
       "2020-02-11    726.580000\n",
       "2020-02-12    730.035000\n",
       "2020-02-13    730.650000\n",
       "2020-02-14    725.436667\n",
       "2020-02-17    727.871667\n",
       "2020-02-18    724.646667\n",
       "2020-02-19    728.916667\n",
       "2020-02-20    742.735000\n",
       "2020-02-21    743.385000\n",
       "2020-02-24    728.310000\n",
       "2020-02-25    716.598333\n",
       "2020-02-26    714.566667\n",
       "Length: 521, dtype: float64"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.mean(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "多个对象之间的操作，如果维度不对，`pandas` 会自动调用 `broadcasting` 机制："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020-01-01    NaN\n",
      "2020-01-02    NaN\n",
      "2020-01-03    1.0\n",
      "2020-01-04    3.0\n",
      "2020-01-05    5.0\n",
      "2020-01-06    NaN\n",
      "Freq: D, dtype: float64\n"
     ]
    }
   ],
   "source": [
    "s = pd.Series([1,3,5,np.nan,6,8], index=dates).shift(2)\n",
    "\n",
    "print(s)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "相减 `df - s`："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-02</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-03</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-04</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-05</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-08</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-09</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-10</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-11</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-12</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-15</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-16</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-17</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-18</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-19</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-22</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-23</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-24</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-25</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-26</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-29</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-30</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-31</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-02</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-05</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-06</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-07</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-08</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-09</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-12</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-08</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-09</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-10</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-13</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-14</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-15</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-16</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-17</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-20</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-21</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-22</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-23</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-03</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-04</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-05</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-06</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-07</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-10</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-11</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-12</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-13</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-14</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-17</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-18</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-19</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-20</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-21</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-24</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-25</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-26</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>524 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            open  close  low  high  diff earn\n",
       "2018-01-02   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-03   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-04   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-05   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-08   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-09   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-10   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-11   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-12   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-15   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-16   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-17   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-18   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-19   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-22   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-23   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-24   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-25   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-26   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-29   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-30   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-01-31   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-01   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-02   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-05   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-06   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-07   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-08   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-09   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2018-02-12   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "...          ...    ...  ...   ...   ...  ...\n",
       "2020-01-08   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-09   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-10   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-13   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-14   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-15   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-16   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-17   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-20   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-21   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-22   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-01-23   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-03   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-04   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-05   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-06   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-07   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-10   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-11   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-12   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-13   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-14   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-17   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-18   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-19   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-20   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-21   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-24   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-25   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "2020-02-26   NaN    NaN  NaN   NaN   NaN  NaN\n",
       "\n",
       "[524 rows x 6 columns]"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.sub(s, axis='index')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### apply 操作"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "与 `R` 中的 `apply` 操作类似，接收一个函数，默认是对将函数作用到每一列上："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "      <th>diff</th>\n",
       "      <th>earn</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-02</th>\n",
       "      <td>680.16</td>\n",
       "      <td>683.90</td>\n",
       "      <td>670.34</td>\n",
       "      <td>690.03</td>\n",
       "      <td>3.74</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-03</th>\n",
       "      <td>1361.78</td>\n",
       "      <td>1379.47</td>\n",
       "      <td>1350.25</td>\n",
       "      <td>1390.98</td>\n",
       "      <td>17.69</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-04</th>\n",
       "      <td>2062.73</td>\n",
       "      <td>2095.65</td>\n",
       "      <td>2049.19</td>\n",
       "      <td>2113.41</td>\n",
       "      <td>32.92</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-05</th>\n",
       "      <td>2782.73</td>\n",
       "      <td>2813.08</td>\n",
       "      <td>2756.77</td>\n",
       "      <td>2838.30</td>\n",
       "      <td>30.35</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-08</th>\n",
       "      <td>3496.92</td>\n",
       "      <td>3543.89</td>\n",
       "      <td>3470.96</td>\n",
       "      <td>3573.36</td>\n",
       "      <td>46.97</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-09</th>\n",
       "      <td>4227.81</td>\n",
       "      <td>4304.23</td>\n",
       "      <td>4201.85</td>\n",
       "      <td>4334.17</td>\n",
       "      <td>76.42</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-10</th>\n",
       "      <td>4990.56</td>\n",
       "      <td>5067.67</td>\n",
       "      <td>4953.41</td>\n",
       "      <td>5100.69</td>\n",
       "      <td>77.11</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-11</th>\n",
       "      <td>5755.26</td>\n",
       "      <td>5820.52</td>\n",
       "      <td>5703.53</td>\n",
       "      <td>5866.36</td>\n",
       "      <td>65.26</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-12</th>\n",
       "      <td>6507.10</td>\n",
       "      <td>6586.60</td>\n",
       "      <td>6448.81</td>\n",
       "      <td>6632.80</td>\n",
       "      <td>79.50</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-15</th>\n",
       "      <td>7278.07</td>\n",
       "      <td>7349.71</td>\n",
       "      <td>7205.75</td>\n",
       "      <td>7409.21</td>\n",
       "      <td>71.64</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-16</th>\n",
       "      <td>8036.43</td>\n",
       "      <td>8100.74</td>\n",
       "      <td>7951.98</td>\n",
       "      <td>8175.47</td>\n",
       "      <td>64.31</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-17</th>\n",
       "      <td>8784.61</td>\n",
       "      <td>8827.47</td>\n",
       "      <td>8669.56</td>\n",
       "      <td>8927.53</td>\n",
       "      <td>42.86</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-18</th>\n",
       "      <td>9511.34</td>\n",
       "      <td>9556.93</td>\n",
       "      <td>9392.56</td>\n",
       "      <td>9670.85</td>\n",
       "      <td>45.59</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-19</th>\n",
       "      <td>10242.90</td>\n",
       "      <td>10285.85</td>\n",
       "      <td>10110.64</td>\n",
       "      <td>10408.24</td>\n",
       "      <td>42.95</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-22</th>\n",
       "      <td>10973.40</td>\n",
       "      <td>11037.56</td>\n",
       "      <td>10841.14</td>\n",
       "      <td>11160.30</td>\n",
       "      <td>64.16</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-23</th>\n",
       "      <td>11729.17</td>\n",
       "      <td>11789.41</td>\n",
       "      <td>11587.96</td>\n",
       "      <td>11918.19</td>\n",
       "      <td>60.24</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-24</th>\n",
       "      <td>12483.60</td>\n",
       "      <td>12532.20</td>\n",
       "      <td>12325.06</td>\n",
       "      <td>12672.64</td>\n",
       "      <td>48.60</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-25</th>\n",
       "      <td>13223.03</td>\n",
       "      <td>13279.56</td>\n",
       "      <td>13054.78</td>\n",
       "      <td>13426.65</td>\n",
       "      <td>56.53</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-26</th>\n",
       "      <td>13968.53</td>\n",
       "      <td>14034.75</td>\n",
       "      <td>13797.13</td>\n",
       "      <td>14182.02</td>\n",
       "      <td>66.22</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-29</th>\n",
       "      <td>14725.22</td>\n",
       "      <td>14750.20</td>\n",
       "      <td>14511.30</td>\n",
       "      <td>14939.59</td>\n",
       "      <td>24.98</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-30</th>\n",
       "      <td>15440.36</td>\n",
       "      <td>15471.25</td>\n",
       "      <td>15220.63</td>\n",
       "      <td>15667.14</td>\n",
       "      <td>30.89</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-31</th>\n",
       "      <td>16158.42</td>\n",
       "      <td>16214.12</td>\n",
       "      <td>15938.69</td>\n",
       "      <td>16416.98</td>\n",
       "      <td>55.70</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-01</th>\n",
       "      <td>16903.68</td>\n",
       "      <td>16950.38</td>\n",
       "      <td>16670.27</td>\n",
       "      <td>17162.53</td>\n",
       "      <td>46.70</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-02</th>\n",
       "      <td>17634.58</td>\n",
       "      <td>17669.80</td>\n",
       "      <td>17374.72</td>\n",
       "      <td>17894.41</td>\n",
       "      <td>35.22</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-05</th>\n",
       "      <td>18341.19</td>\n",
       "      <td>18367.67</td>\n",
       "      <td>18060.32</td>\n",
       "      <td>18603.68</td>\n",
       "      <td>26.48</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-06</th>\n",
       "      <td>19024.27</td>\n",
       "      <td>19056.44</td>\n",
       "      <td>18743.40</td>\n",
       "      <td>19305.80</td>\n",
       "      <td>32.17</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-07</th>\n",
       "      <td>19723.86</td>\n",
       "      <td>19720.50</td>\n",
       "      <td>19406.08</td>\n",
       "      <td>20009.16</td>\n",
       "      <td>-3.36</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-08</th>\n",
       "      <td>20386.73</td>\n",
       "      <td>20401.62</td>\n",
       "      <td>20068.95</td>\n",
       "      <td>20706.81</td>\n",
       "      <td>14.89</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-09</th>\n",
       "      <td>21047.46</td>\n",
       "      <td>21065.68</td>\n",
       "      <td>20708.30</td>\n",
       "      <td>21377.15</td>\n",
       "      <td>18.22</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-12</th>\n",
       "      <td>21718.88</td>\n",
       "      <td>21743.39</td>\n",
       "      <td>21374.08</td>\n",
       "      <td>22062.66</td>\n",
       "      <td>24.51</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-08</th>\n",
       "      <td>403089.63</td>\n",
       "      <td>403544.93</td>\n",
       "      <td>398216.24</td>\n",
       "      <td>408337.27</td>\n",
       "      <td>455.30</td>\n",
       "      <td>237</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-09</th>\n",
       "      <td>404183.63</td>\n",
       "      <td>404647.63</td>\n",
       "      <td>399306.24</td>\n",
       "      <td>409442.66</td>\n",
       "      <td>464.00</td>\n",
       "      <td>238</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-10</th>\n",
       "      <td>405292.63</td>\n",
       "      <td>405760.13</td>\n",
       "      <td>400408.74</td>\n",
       "      <td>410558.65</td>\n",
       "      <td>467.50</td>\n",
       "      <td>239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-13</th>\n",
       "      <td>406405.13</td>\n",
       "      <td>406884.40</td>\n",
       "      <td>401520.74</td>\n",
       "      <td>411687.85</td>\n",
       "      <td>479.27</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-14</th>\n",
       "      <td>407529.33</td>\n",
       "      <td>407991.80</td>\n",
       "      <td>402623.74</td>\n",
       "      <td>412812.74</td>\n",
       "      <td>462.47</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-15</th>\n",
       "      <td>408638.34</td>\n",
       "      <td>409103.93</td>\n",
       "      <td>403728.74</td>\n",
       "      <td>413934.34</td>\n",
       "      <td>465.59</td>\n",
       "      <td>241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-16</th>\n",
       "      <td>409757.21</td>\n",
       "      <td>410210.93</td>\n",
       "      <td>404831.32</td>\n",
       "      <td>415053.21</td>\n",
       "      <td>453.72</td>\n",
       "      <td>241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-17</th>\n",
       "      <td>410867.21</td>\n",
       "      <td>411318.43</td>\n",
       "      <td>405932.33</td>\n",
       "      <td>416165.99</td>\n",
       "      <td>451.22</td>\n",
       "      <td>241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-20</th>\n",
       "      <td>411979.07</td>\n",
       "      <td>412409.43</td>\n",
       "      <td>407014.33</td>\n",
       "      <td>417277.85</td>\n",
       "      <td>430.36</td>\n",
       "      <td>241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-21</th>\n",
       "      <td>413060.07</td>\n",
       "      <td>413484.73</td>\n",
       "      <td>408086.63</td>\n",
       "      <td>418364.85</td>\n",
       "      <td>424.66</td>\n",
       "      <td>241</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-22</th>\n",
       "      <td>414130.07</td>\n",
       "      <td>414560.24</td>\n",
       "      <td>409142.01</td>\n",
       "      <td>419448.85</td>\n",
       "      <td>430.17</td>\n",
       "      <td>242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-01-23</th>\n",
       "      <td>415206.07</td>\n",
       "      <td>415613.04</td>\n",
       "      <td>410179.01</td>\n",
       "      <td>420524.85</td>\n",
       "      <td>406.97</td>\n",
       "      <td>242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-03</th>\n",
       "      <td>416191.07</td>\n",
       "      <td>416616.96</td>\n",
       "      <td>411159.01</td>\n",
       "      <td>421535.53</td>\n",
       "      <td>425.89</td>\n",
       "      <td>243</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-04</th>\n",
       "      <td>417206.07</td>\n",
       "      <td>417654.97</td>\n",
       "      <td>412170.02</td>\n",
       "      <td>422592.53</td>\n",
       "      <td>448.90</td>\n",
       "      <td>244</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-05</th>\n",
       "      <td>418256.07</td>\n",
       "      <td>418704.96</td>\n",
       "      <td>413203.05</td>\n",
       "      <td>423646.53</td>\n",
       "      <td>448.89</td>\n",
       "      <td>244</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-06</th>\n",
       "      <td>419315.50</td>\n",
       "      <td>419775.96</td>\n",
       "      <td>414255.07</td>\n",
       "      <td>424721.53</td>\n",
       "      <td>460.46</td>\n",
       "      <td>245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-07</th>\n",
       "      <td>420385.51</td>\n",
       "      <td>420851.96</td>\n",
       "      <td>415316.09</td>\n",
       "      <td>425798.53</td>\n",
       "      <td>466.45</td>\n",
       "      <td>246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-10</th>\n",
       "      <td>421447.51</td>\n",
       "      <td>421918.45</td>\n",
       "      <td>416373.29</td>\n",
       "      <td>426873.13</td>\n",
       "      <td>470.94</td>\n",
       "      <td>247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-11</th>\n",
       "      <td>422510.51</td>\n",
       "      <td>423016.45</td>\n",
       "      <td>417436.09</td>\n",
       "      <td>427972.81</td>\n",
       "      <td>505.94</td>\n",
       "      <td>248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-12</th>\n",
       "      <td>423599.51</td>\n",
       "      <td>424113.72</td>\n",
       "      <td>418521.97</td>\n",
       "      <td>429071.60</td>\n",
       "      <td>514.21</td>\n",
       "      <td>249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-13</th>\n",
       "      <td>424697.51</td>\n",
       "      <td>425204.72</td>\n",
       "      <td>419609.98</td>\n",
       "      <td>430185.49</td>\n",
       "      <td>507.21</td>\n",
       "      <td>249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-14</th>\n",
       "      <td>425787.96</td>\n",
       "      <td>426292.72</td>\n",
       "      <td>420693.09</td>\n",
       "      <td>431279.00</td>\n",
       "      <td>504.76</td>\n",
       "      <td>249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-17</th>\n",
       "      <td>426870.46</td>\n",
       "      <td>427386.54</td>\n",
       "      <td>421775.49</td>\n",
       "      <td>432375.19</td>\n",
       "      <td>516.08</td>\n",
       "      <td>250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-18</th>\n",
       "      <td>427960.47</td>\n",
       "      <td>428470.54</td>\n",
       "      <td>422858.49</td>\n",
       "      <td>433472.07</td>\n",
       "      <td>510.07</td>\n",
       "      <td>250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-19</th>\n",
       "      <td>429045.47</td>\n",
       "      <td>429567.04</td>\n",
       "      <td>423936.49</td>\n",
       "      <td>434573.57</td>\n",
       "      <td>521.57</td>\n",
       "      <td>251</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-20</th>\n",
       "      <td>430142.17</td>\n",
       "      <td>430685.04</td>\n",
       "      <td>425031.90</td>\n",
       "      <td>435697.57</td>\n",
       "      <td>542.87</td>\n",
       "      <td>252</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-21</th>\n",
       "      <td>431253.63</td>\n",
       "      <td>431797.92</td>\n",
       "      <td>426141.91</td>\n",
       "      <td>436821.11</td>\n",
       "      <td>544.29</td>\n",
       "      <td>253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-24</th>\n",
       "      <td>432359.13</td>\n",
       "      <td>432885.10</td>\n",
       "      <td>427227.41</td>\n",
       "      <td>437931.11</td>\n",
       "      <td>525.97</td>\n",
       "      <td>253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-25</th>\n",
       "      <td>433437.13</td>\n",
       "      <td>433959.91</td>\n",
       "      <td>428295.29</td>\n",
       "      <td>439013.20</td>\n",
       "      <td>522.78</td>\n",
       "      <td>253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2020-02-26</th>\n",
       "      <td>434499.13</td>\n",
       "      <td>435033.61</td>\n",
       "      <td>429350.29</td>\n",
       "      <td>440097.20</td>\n",
       "      <td>534.48</td>\n",
       "      <td>254</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>521 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                 open      close        low       high    diff  earn\n",
       "2018-01-02     680.16     683.90     670.34     690.03    3.74     1\n",
       "2018-01-03    1361.78    1379.47    1350.25    1390.98   17.69     2\n",
       "2018-01-04    2062.73    2095.65    2049.19    2113.41   32.92     3\n",
       "2018-01-05    2782.73    2813.08    2756.77    2838.30   30.35     3\n",
       "2018-01-08    3496.92    3543.89    3470.96    3573.36   46.97     4\n",
       "2018-01-09    4227.81    4304.23    4201.85    4334.17   76.42     5\n",
       "2018-01-10    4990.56    5067.67    4953.41    5100.69   77.11     6\n",
       "2018-01-11    5755.26    5820.52    5703.53    5866.36   65.26     6\n",
       "2018-01-12    6507.10    6586.60    6448.81    6632.80   79.50     7\n",
       "2018-01-15    7278.07    7349.71    7205.75    7409.21   71.64     7\n",
       "2018-01-16    8036.43    8100.74    7951.98    8175.47   64.31     7\n",
       "2018-01-17    8784.61    8827.47    8669.56    8927.53   42.86     7\n",
       "2018-01-18    9511.34    9556.93    9392.56    9670.85   45.59     8\n",
       "2018-01-19   10242.90   10285.85   10110.64   10408.24   42.95     8\n",
       "2018-01-22   10973.40   11037.56   10841.14   11160.30   64.16     9\n",
       "2018-01-23   11729.17   11789.41   11587.96   11918.19   60.24     9\n",
       "2018-01-24   12483.60   12532.20   12325.06   12672.64   48.60     9\n",
       "2018-01-25   13223.03   13279.56   13054.78   13426.65   56.53    10\n",
       "2018-01-26   13968.53   14034.75   13797.13   14182.02   66.22    11\n",
       "2018-01-29   14725.22   14750.20   14511.30   14939.59   24.98    11\n",
       "2018-01-30   15440.36   15471.25   15220.63   15667.14   30.89    12\n",
       "2018-01-31   16158.42   16214.12   15938.69   16416.98   55.70    13\n",
       "2018-02-01   16903.68   16950.38   16670.27   17162.53   46.70    13\n",
       "2018-02-02   17634.58   17669.80   17374.72   17894.41   35.22    13\n",
       "2018-02-05   18341.19   18367.67   18060.32   18603.68   26.48    13\n",
       "2018-02-06   19024.27   19056.44   18743.40   19305.80   32.17    14\n",
       "2018-02-07   19723.86   19720.50   19406.08   20009.16   -3.36    14\n",
       "2018-02-08   20386.73   20401.62   20068.95   20706.81   14.89    15\n",
       "2018-02-09   21047.46   21065.68   20708.30   21377.15   18.22    16\n",
       "2018-02-12   21718.88   21743.39   21374.08   22062.66   24.51    17\n",
       "...               ...        ...        ...        ...     ...   ...\n",
       "2020-01-08  403089.63  403544.93  398216.24  408337.27  455.30   237\n",
       "2020-01-09  404183.63  404647.63  399306.24  409442.66  464.00   238\n",
       "2020-01-10  405292.63  405760.13  400408.74  410558.65  467.50   239\n",
       "2020-01-13  406405.13  406884.40  401520.74  411687.85  479.27   240\n",
       "2020-01-14  407529.33  407991.80  402623.74  412812.74  462.47   240\n",
       "2020-01-15  408638.34  409103.93  403728.74  413934.34  465.59   241\n",
       "2020-01-16  409757.21  410210.93  404831.32  415053.21  453.72   241\n",
       "2020-01-17  410867.21  411318.43  405932.33  416165.99  451.22   241\n",
       "2020-01-20  411979.07  412409.43  407014.33  417277.85  430.36   241\n",
       "2020-01-21  413060.07  413484.73  408086.63  418364.85  424.66   241\n",
       "2020-01-22  414130.07  414560.24  409142.01  419448.85  430.17   242\n",
       "2020-01-23  415206.07  415613.04  410179.01  420524.85  406.97   242\n",
       "2020-02-03  416191.07  416616.96  411159.01  421535.53  425.89   243\n",
       "2020-02-04  417206.07  417654.97  412170.02  422592.53  448.90   244\n",
       "2020-02-05  418256.07  418704.96  413203.05  423646.53  448.89   244\n",
       "2020-02-06  419315.50  419775.96  414255.07  424721.53  460.46   245\n",
       "2020-02-07  420385.51  420851.96  415316.09  425798.53  466.45   246\n",
       "2020-02-10  421447.51  421918.45  416373.29  426873.13  470.94   247\n",
       "2020-02-11  422510.51  423016.45  417436.09  427972.81  505.94   248\n",
       "2020-02-12  423599.51  424113.72  418521.97  429071.60  514.21   249\n",
       "2020-02-13  424697.51  425204.72  419609.98  430185.49  507.21   249\n",
       "2020-02-14  425787.96  426292.72  420693.09  431279.00  504.76   249\n",
       "2020-02-17  426870.46  427386.54  421775.49  432375.19  516.08   250\n",
       "2020-02-18  427960.47  428470.54  422858.49  433472.07  510.07   250\n",
       "2020-02-19  429045.47  429567.04  423936.49  434573.57  521.57   251\n",
       "2020-02-20  430142.17  430685.04  425031.90  435697.57  542.87   252\n",
       "2020-02-21  431253.63  431797.92  426141.91  436821.11  544.29   253\n",
       "2020-02-24  432359.13  432885.10  427227.41  437931.11  525.97   253\n",
       "2020-02-25  433437.13  433959.91  428295.29  439013.20  522.78   253\n",
       "2020-02-26  434499.13  435033.61  429350.29  440097.20  534.48   254\n",
       "\n",
       "[521 rows x 6 columns]"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(np.cumsum)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "求每列最大最小值之差："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "open     728.44\n",
       "close    717.40\n",
       "low      726.47\n",
       "high     706.53\n",
       "diff      94.04\n",
       "earn       1.00\n",
       "dtype: float64"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.apply(lambda x: x.max() - x.min())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 直方图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    6\n",
      "1    5\n",
      "2    0\n",
      "3    3\n",
      "4    4\n",
      "5    2\n",
      "6    0\n",
      "7    4\n",
      "8    6\n",
      "9    4\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "s = pd.Series(np.random.randint(0, 7, size=10))\n",
    "print(s)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "直方图信息："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4    3\n",
      "6    2\n",
      "0    2\n",
      "5    1\n",
      "3    1\n",
      "2    1\n",
      "dtype: int64\n"
     ]
    }
   ],
   "source": [
    "print(s.value_counts())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "绘制直方图信息："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAARGklEQVR4nO3dXYxcZ33H8e8P20DqBefC0RI5po5EhIRiFZJVQpUK7YKozItIL1IpURoIArlC0EJrVAwXQSBVhYtAeRPIImkCTVlQAoqbRKUIsg254MVOA44T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dzzLPDyJP863pJGV1VHun+PAl9iYfp1rTkMHD7pr77bWQj43qy1QB/mZwh0BnUfJN4EPFJVHxp3PSuR5Lwk53bL57Dw4fv3xlvVaKrq3VV1QVVtY+F98rWq+qsxlzWSJBu7D9zppij+HFhzV4dV1f8CP07ywu6uVwC9XjxwRn9tcaVO9TMEYy5rJEk+B0wDm5McBt5bVTeNt6qRXAFcBxzo5p4B3lNV94yxplGdD9zaXU31DOALVbWmL/drxCTwpe6/WFgP/FtV/cd4SxrZ3wC3dSekPwLe2Gfna+qyRUnSqa21KRdJ0ikY6JLUCANdkhphoEtSIwx0SWqEgS5JjTDQJakR/w/dCV9F3gNl8QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "h = s.hist()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 字符串方法"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "当 `Series` 或者 `DataFrame` 的某一列是字符串时，我们可以用 `.str` 对这个字符串数组进行字符串的基本操作： "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0       a\n",
      "1       b\n",
      "2       c\n",
      "3    aaba\n",
      "4    baca\n",
      "5     NaN\n",
      "6    caba\n",
      "7     dog\n",
      "8     cat\n",
      "dtype: object\n"
     ]
    }
   ],
   "source": [
    "s = pd.Series(['A', 'B', 'C', 'Aaba', 'Baca', np.nan, 'CABA', 'dog', 'cat'])\n",
    "\n",
    "print(s.str.lower())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 合并"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 连接"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.477190</td>\n",
       "      <td>0.474403</td>\n",
       "      <td>0.441759</td>\n",
       "      <td>-1.541982</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.100660</td>\n",
       "      <td>1.050589</td>\n",
       "      <td>-0.476668</td>\n",
       "      <td>0.371736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.708880</td>\n",
       "      <td>0.093394</td>\n",
       "      <td>-0.489811</td>\n",
       "      <td>0.820312</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-1.719851</td>\n",
       "      <td>0.767359</td>\n",
       "      <td>-0.108242</td>\n",
       "      <td>0.637253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.142723</td>\n",
       "      <td>-0.498255</td>\n",
       "      <td>1.092781</td>\n",
       "      <td>-0.191692</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-0.433055</td>\n",
       "      <td>0.315514</td>\n",
       "      <td>0.451953</td>\n",
       "      <td>1.263883</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.036724</td>\n",
       "      <td>-0.980194</td>\n",
       "      <td>0.851046</td>\n",
       "      <td>0.857887</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1.333249</td>\n",
       "      <td>1.087420</td>\n",
       "      <td>-1.809464</td>\n",
       "      <td>0.429950</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>-1.084040</td>\n",
       "      <td>-0.910443</td>\n",
       "      <td>-0.467711</td>\n",
       "      <td>-0.093239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>-0.186055</td>\n",
       "      <td>-2.348326</td>\n",
       "      <td>0.654666</td>\n",
       "      <td>-0.307851</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1         2         3\n",
       "0 -0.477190  0.474403  0.441759 -1.541982\n",
       "1  0.100660  1.050589 -0.476668  0.371736\n",
       "2 -0.708880  0.093394 -0.489811  0.820312\n",
       "3 -1.719851  0.767359 -0.108242  0.637253\n",
       "4  1.142723 -0.498255  1.092781 -0.191692\n",
       "5 -0.433055  0.315514  0.451953  1.263883\n",
       "6  0.036724 -0.980194  0.851046  0.857887\n",
       "7  1.333249  1.087420 -1.809464  0.429950\n",
       "8 -1.084040 -0.910443 -0.467711 -0.093239\n",
       "9 -0.186055 -2.348326  0.654666 -0.307851"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randn(10, 4))\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以使用 `pd.concat` 函数将多个 `pandas` 对象进行连接："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.477190</td>\n",
       "      <td>0.474403</td>\n",
       "      <td>0.441759</td>\n",
       "      <td>-1.541982</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.100660</td>\n",
       "      <td>1.050589</td>\n",
       "      <td>-0.476668</td>\n",
       "      <td>0.371736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.142723</td>\n",
       "      <td>-0.498255</td>\n",
       "      <td>1.092781</td>\n",
       "      <td>-0.191692</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1.333249</td>\n",
       "      <td>1.087420</td>\n",
       "      <td>-1.809464</td>\n",
       "      <td>0.429950</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>-1.084040</td>\n",
       "      <td>-0.910443</td>\n",
       "      <td>-0.467711</td>\n",
       "      <td>-0.093239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>-0.186055</td>\n",
       "      <td>-2.348326</td>\n",
       "      <td>0.654666</td>\n",
       "      <td>-0.307851</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1         2         3\n",
       "0 -0.477190  0.474403  0.441759 -1.541982\n",
       "1  0.100660  1.050589 -0.476668  0.371736\n",
       "4  1.142723 -0.498255  1.092781 -0.191692\n",
       "7  1.333249  1.087420 -1.809464  0.429950\n",
       "8 -1.084040 -0.910443 -0.467711 -0.093239\n",
       "9 -0.186055 -2.348326  0.654666 -0.307851"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pieces = [df[:2], df[4:5], df[7:]]\n",
    "\n",
    "pd.concat(pieces)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据库中的 Join"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`merge` 可以实现数据库中的 `join` 操作："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   key  lval\n",
      "0  foo     1\n",
      "1  foo     2\n",
      "   key  rval\n",
      "0  foo     4\n",
      "1  foo     5\n"
     ]
    }
   ],
   "source": [
    "left = pd.DataFrame({'key': ['foo', 'foo'], 'lval': [1, 2]})\n",
    "right = pd.DataFrame({'key': ['foo', 'foo'], 'rval': [4, 5]})\n",
    "\n",
    "print(left)\n",
    "print(right)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>key</th>\n",
       "      <th>lval</th>\n",
       "      <th>rval</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>foo</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>foo</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>foo</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>foo</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   key  lval  rval\n",
       "0  foo     1     4\n",
       "1  foo     1     5\n",
       "2  foo     2     4\n",
       "3  foo     2     5"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(left, right, on='key')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### append"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "向 `DataFrame` 中添加行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.539014</td>\n",
       "      <td>1.367913</td>\n",
       "      <td>2.149890</td>\n",
       "      <td>0.297486</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.758937</td>\n",
       "      <td>0.346353</td>\n",
       "      <td>0.695128</td>\n",
       "      <td>1.994259</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.087300</td>\n",
       "      <td>1.552435</td>\n",
       "      <td>1.477772</td>\n",
       "      <td>-1.180227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.657937</td>\n",
       "      <td>-2.068016</td>\n",
       "      <td>-0.392507</td>\n",
       "      <td>-0.853410</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.370281</td>\n",
       "      <td>-1.480300</td>\n",
       "      <td>-0.210933</td>\n",
       "      <td>-0.734074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.762831</td>\n",
       "      <td>0.440834</td>\n",
       "      <td>1.336303</td>\n",
       "      <td>-0.907963</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-0.860949</td>\n",
       "      <td>-0.523219</td>\n",
       "      <td>-0.814096</td>\n",
       "      <td>-1.598702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.160576</td>\n",
       "      <td>-0.334343</td>\n",
       "      <td>-0.491057</td>\n",
       "      <td>-0.600479</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          A         B         C         D\n",
       "0  0.539014  1.367913  2.149890  0.297486\n",
       "1  0.758937  0.346353  0.695128  1.994259\n",
       "2  1.087300  1.552435  1.477772 -1.180227\n",
       "3 -0.657937 -2.068016 -0.392507 -0.853410\n",
       "4 -1.370281 -1.480300 -0.210933 -0.734074\n",
       "5  0.762831  0.440834  1.336303 -0.907963\n",
       "6 -0.860949 -0.523219 -0.814096 -1.598702\n",
       "7  0.160576 -0.334343 -0.491057 -0.600479"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randn(8, 4), columns=['A','B','C','D'])\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "将第三行的值添加到最后："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.539014</td>\n",
       "      <td>1.367913</td>\n",
       "      <td>2.149890</td>\n",
       "      <td>0.297486</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.758937</td>\n",
       "      <td>0.346353</td>\n",
       "      <td>0.695128</td>\n",
       "      <td>1.994259</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.087300</td>\n",
       "      <td>1.552435</td>\n",
       "      <td>1.477772</td>\n",
       "      <td>-1.180227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.657937</td>\n",
       "      <td>-2.068016</td>\n",
       "      <td>-0.392507</td>\n",
       "      <td>-0.853410</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.370281</td>\n",
       "      <td>-1.480300</td>\n",
       "      <td>-0.210933</td>\n",
       "      <td>-0.734074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.762831</td>\n",
       "      <td>0.440834</td>\n",
       "      <td>1.336303</td>\n",
       "      <td>-0.907963</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-0.860949</td>\n",
       "      <td>-0.523219</td>\n",
       "      <td>-0.814096</td>\n",
       "      <td>-1.598702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.160576</td>\n",
       "      <td>-0.334343</td>\n",
       "      <td>-0.491057</td>\n",
       "      <td>-0.600479</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>-0.657937</td>\n",
       "      <td>-2.068016</td>\n",
       "      <td>-0.392507</td>\n",
       "      <td>-0.853410</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          A         B         C         D\n",
       "0  0.539014  1.367913  2.149890  0.297486\n",
       "1  0.758937  0.346353  0.695128  1.994259\n",
       "2  1.087300  1.552435  1.477772 -1.180227\n",
       "3 -0.657937 -2.068016 -0.392507 -0.853410\n",
       "4 -1.370281 -1.480300 -0.210933 -0.734074\n",
       "5  0.762831  0.440834  1.336303 -0.907963\n",
       "6 -0.860949 -0.523219 -0.814096 -1.598702\n",
       "7  0.160576 -0.334343 -0.491057 -0.600479\n",
       "8 -0.657937 -2.068016 -0.392507 -0.853410"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s = df.iloc[3]\n",
    "\n",
    "df.append(s, ignore_index=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Grouping"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>foo</td>\n",
       "      <td>one</td>\n",
       "      <td>-0.255698</td>\n",
       "      <td>-0.204804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>bar</td>\n",
       "      <td>one</td>\n",
       "      <td>0.997013</td>\n",
       "      <td>-0.889811</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>foo</td>\n",
       "      <td>two</td>\n",
       "      <td>-0.282028</td>\n",
       "      <td>0.312806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>bar</td>\n",
       "      <td>three</td>\n",
       "      <td>1.595272</td>\n",
       "      <td>-1.085075</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>foo</td>\n",
       "      <td>two</td>\n",
       "      <td>1.009271</td>\n",
       "      <td>1.020723</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>bar</td>\n",
       "      <td>two</td>\n",
       "      <td>0.700614</td>\n",
       "      <td>-0.228229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>foo</td>\n",
       "      <td>one</td>\n",
       "      <td>1.281484</td>\n",
       "      <td>-0.409890</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>foo</td>\n",
       "      <td>three</td>\n",
       "      <td>1.832907</td>\n",
       "      <td>0.725863</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     A      B         C         D\n",
       "0  foo    one -0.255698 -0.204804\n",
       "1  bar    one  0.997013 -0.889811\n",
       "2  foo    two -0.282028  0.312806\n",
       "3  bar  three  1.595272 -1.085075\n",
       "4  foo    two  1.009271  1.020723\n",
       "5  bar    two  0.700614 -0.228229\n",
       "6  foo    one  1.281484 -0.409890\n",
       "7  foo  three  1.832907  0.725863"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',\n",
    "                          'foo', 'bar', 'foo', 'foo'],\n",
    "                   'B' : ['one', 'one', 'two', 'three',\n",
    "                          'two', 'two', 'one', 'three'],\n",
    "                   'C' : np.random.randn(8),\n",
    "                   'D' : np.random.randn(8)})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "按照 `A` 的值进行分类："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>bar</th>\n",
       "      <td>3.292898</td>\n",
       "      <td>-2.203116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>foo</th>\n",
       "      <td>3.585937</td>\n",
       "      <td>1.444698</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            C         D\n",
       "A                      \n",
       "bar  3.292898 -2.203116\n",
       "foo  3.585937  1.444698"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby('A').sum()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "按照 `A, B` 的值进行分类："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">bar</th>\n",
       "      <th>one</th>\n",
       "      <td>0.997013</td>\n",
       "      <td>-0.889811</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>three</th>\n",
       "      <td>1.595272</td>\n",
       "      <td>-1.085075</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>0.700614</td>\n",
       "      <td>-0.228229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">foo</th>\n",
       "      <th>one</th>\n",
       "      <td>1.025786</td>\n",
       "      <td>-0.614694</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>three</th>\n",
       "      <td>1.832907</td>\n",
       "      <td>0.725863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>0.727244</td>\n",
       "      <td>1.333529</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  C         D\n",
       "A   B                        \n",
       "bar one    0.997013 -0.889811\n",
       "    three  1.595272 -1.085075\n",
       "    two    0.700614 -0.228229\n",
       "foo one    1.025786 -0.614694\n",
       "    three  1.832907  0.725863\n",
       "    two    0.727244  1.333529"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(['A', 'B']).sum()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 改变形状"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Stack"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "产生一个多 `index` 的 `DataFrame`："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>first</th>\n",
       "      <th>second</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">bar</th>\n",
       "      <th>one</th>\n",
       "      <td>1.346837</td>\n",
       "      <td>-1.083800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>-0.385865</td>\n",
       "      <td>-0.033202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">baz</th>\n",
       "      <th>one</th>\n",
       "      <td>2.948892</td>\n",
       "      <td>0.942314</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>-1.798874</td>\n",
       "      <td>-1.222116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">foo</th>\n",
       "      <th>one</th>\n",
       "      <td>-1.921688</td>\n",
       "      <td>1.035728</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>-0.152426</td>\n",
       "      <td>2.073630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">qux</th>\n",
       "      <th>one</th>\n",
       "      <td>-2.195979</td>\n",
       "      <td>-0.354062</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>-1.313296</td>\n",
       "      <td>-0.290653</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     A         B\n",
       "first second                    \n",
       "bar   one     1.346837 -1.083800\n",
       "      two    -0.385865 -0.033202\n",
       "baz   one     2.948892  0.942314\n",
       "      two    -1.798874 -1.222116\n",
       "foo   one    -1.921688  1.035728\n",
       "      two    -0.152426  2.073630\n",
       "qux   one    -2.195979 -0.354062\n",
       "      two    -1.313296 -0.290653"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tuples = list(zip(*[['bar', 'bar', 'baz', 'baz',\n",
    "                     'foo', 'foo', 'qux', 'qux'],\n",
    "                    ['one', 'two', 'one', 'two',\n",
    "                     'one', 'two', 'one', 'two']]))\n",
    "\n",
    "index = pd.MultiIndex.from_tuples(tuples, names=['first', 'second'])\n",
    "df = pd.DataFrame(np.random.randn(8, 2), index=index, columns=['A', 'B'])\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`stack` 方法将 `columns` 变成一个新的 `index` 部分："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "first  second   \n",
       "bar    one     A    1.346837\n",
       "               B   -1.083800\n",
       "       two     A   -0.385865\n",
       "               B   -0.033202\n",
       "baz    one     A    2.948892\n",
       "               B    0.942314\n",
       "       two     A   -1.798874\n",
       "               B   -1.222116\n",
       "dtype: float64"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = df[:4]\n",
    "\n",
    "stacked = df2.stack()\n",
    "\n",
    "stacked"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以使用 `unstack()` 将最后一级 `index` 放回 `column`："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>first</th>\n",
       "      <th>second</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">bar</th>\n",
       "      <th>one</th>\n",
       "      <td>1.346837</td>\n",
       "      <td>-1.083800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>-0.385865</td>\n",
       "      <td>-0.033202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">baz</th>\n",
       "      <th>one</th>\n",
       "      <td>2.948892</td>\n",
       "      <td>0.942314</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>two</th>\n",
       "      <td>-1.798874</td>\n",
       "      <td>-1.222116</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     A         B\n",
       "first second                    \n",
       "bar   one     1.346837 -1.083800\n",
       "      two    -0.385865 -0.033202\n",
       "baz   one     2.948892  0.942314\n",
       "      two    -1.798874 -1.222116"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stacked.unstack()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "也可以指定其他的级别："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>second</th>\n",
       "      <th>one</th>\n",
       "      <th>two</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>first</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">bar</th>\n",
       "      <th>A</th>\n",
       "      <td>1.346837</td>\n",
       "      <td>-0.385865</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>-1.083800</td>\n",
       "      <td>-0.033202</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">baz</th>\n",
       "      <th>A</th>\n",
       "      <td>2.948892</td>\n",
       "      <td>-1.798874</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>0.942314</td>\n",
       "      <td>-1.222116</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "second        one       two\n",
       "first                      \n",
       "bar   A  1.346837 -0.385865\n",
       "      B -1.083800 -0.033202\n",
       "baz   A  2.948892 -1.798874\n",
       "      B  0.942314 -1.222116"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stacked.unstack(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 时间序列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "金融分析中常用到时间序列数据："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2012-03-06    0.400761\n",
       "2012-03-07   -0.294005\n",
       "2012-03-08    0.559535\n",
       "2012-03-09   -0.616336\n",
       "2012-03-10    0.696618\n",
       "Freq: D, dtype: float64"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rng = pd.date_range('3/6/2012 00:00', periods=5, freq='D')\n",
    "ts = pd.Series(np.random.randn(len(rng)), rng)\n",
    "\n",
    "ts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "标准时间表示："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2012-03-06 00:00:00+00:00    0.400761\n",
       "2012-03-07 00:00:00+00:00   -0.294005\n",
       "2012-03-08 00:00:00+00:00    0.559535\n",
       "2012-03-09 00:00:00+00:00   -0.616336\n",
       "2012-03-10 00:00:00+00:00    0.696618\n",
       "Freq: D, dtype: float64"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts_utc = ts.tz_localize('UTC')\n",
    "\n",
    "ts_utc"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "改变时区表示："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2012-03-05 19:00:00-05:00    0.400761\n",
       "2012-03-06 19:00:00-05:00   -0.294005\n",
       "2012-03-07 19:00:00-05:00    0.559535\n",
       "2012-03-08 19:00:00-05:00   -0.616336\n",
       "2012-03-09 19:00:00-05:00    0.696618\n",
       "Freq: D, dtype: float64"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ts_utc.tz_convert('US/Eastern')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Categoricals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>raw_grade</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>b</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>a</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>e</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id raw_grade\n",
       "0   1         a\n",
       "1   2         b\n",
       "2   3         b\n",
       "3   4         a\n",
       "4   5         a\n",
       "5   6         e"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\"id\":[1,2,3,4,5,6], \"raw_grade\":['a', 'b', 'b', 'a', 'a', 'e']})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以将 `grade` 变成类别："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    a\n",
       "1    b\n",
       "2    b\n",
       "3    a\n",
       "4    a\n",
       "5    e\n",
       "Name: grade, dtype: category\n",
       "Categories (3, object): [a, b, e]"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"grade\"] = df[\"raw_grade\"].astype(\"category\")\n",
    "\n",
    "df[\"grade\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "将类别的表示转化为有意义的字符："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    very good\n",
       "1         good\n",
       "2         good\n",
       "3    very good\n",
       "4    very good\n",
       "5     very bad\n",
       "Name: grade, dtype: category\n",
       "Categories (3, object): [very good, good, very bad]"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"grade\"].cat.categories = [\"very good\", \"good\", \"very bad\"]\n",
    "\n",
    "df[\"grade\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "添加缺失的类别："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    very good\n",
       "1         good\n",
       "2         good\n",
       "3    very good\n",
       "4    very good\n",
       "5     very bad\n",
       "Name: grade, dtype: category\n",
       "Categories (5, object): [very bad, bad, medium, good, very good]"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[\"grade\"] = df[\"grade\"].cat.set_categories([\"very bad\", \"bad\", \"medium\", \"good\", \"very good\"])\n",
    "df[\"grade\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "使用 `grade` 分组："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "grade\n",
       "very bad     1\n",
       "bad          0\n",
       "medium       0\n",
       "good         2\n",
       "very good    3\n",
       "dtype: int64"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby(\"grade\").size()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 绘图"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "使用 `ggplot` 风格："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "plt.style.use('ggplot')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`Series` 绘图："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAEECAYAAAA1X7/VAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/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TIAhilEOzDgRBEKMcMuQEQRCjHDLkBEEQoxwy5ARBEKMcMuQEQRCjHDLkBEEQoxwy5ARBEKOc/w+yPXs+Sp9vuAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))\n",
    "\n",
    "p = ts.cumsum().plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`DataFrame` 按照 `columns` 绘图："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEECAYAAADNv0QiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOydeZgcVbm439N7z75mJplJJvu+QYIJIBAgBNmDLAJyRVAUUaJeveqPK6AXF0QR5IIXQRS9N7IJSdjBEBIC2feQfZ1kMmvP2vtW5/dHdXV3TfdsmZlkktT7PHnSdepU1ellvvrqW4WUUmJgYGBgcFpiOtkLMDAwMDDoPwwhb2BgYHAaYwh5AwMDg9MYQ8gbGBgYnMYYQt7AwMDgNMYQ8gYGBganMYaQNzAwMDiNsZzsBbSnurr6ZC/B4ARQVFSEy+U62csw6GeM7/nEMGTIkA73GZq8gYGBwWmMIeQNDAwMTmMMIW9gYGBwGmMIeQMDA4PTGEPIGxgYGJzGGELewMDA4DTGEPIGBgYGx4lUFKQSVV8P0KrthpA3MDAwOE6UZx9F+eb1SEVB+e6tKK//Pb5PRsJIr+ckrk7FEPIGBgYGx8vGVer/+3eB34d895/xXcqfH0P53m0n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XUxpDiyFt9fXDm/v79zdHREvV6nVCqNuIqfI9Emb4zh/PycYrHI9vZ2tL66ukq73Qag3W6ztrYWrXc6HYwx3N3dkc1msW2bSqWC67oEQUAQBLiuS6VSSXLrYkhxZS2+t7hyDsOQ4+NjqtUqGxsbY6nlp0h0Tv729pZms8nCwkJ0+Vav11leXubk5IR+v//HuNXFxQWu6zIxMcHBwQGLi4sAXF1dcXl5CXyMUG5tbSW1bfEX4sy62WzS6/UYDAZMTk6yt7cnP+rfRFw5dzodzs7OmJ+fjz670WhET6oU8ZGboYQQIsXknw4hhEgxafJCCJFi0uSFECLFpMkLIUSKSZMXQogUkyYvhBApJk1eCCFSTJq8EEKk2G8oCqnHDNYTeAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index,\n",
    "                  columns=['A', 'B', 'C', 'D'])\n",
    "\n",
    "df.cumsum().plot()\n",
    "p = plt.legend(loc=\"best\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Pandas 文件读写"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 操作csv文件"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从csv文件中读取："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>high</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2018-01-02</td>\n",
       "      <td>680.16</td>\n",
       "      <td>683.90</td>\n",
       "      <td>670.34</td>\n",
       "      <td>690.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2018-01-03</td>\n",
       "      <td>681.62</td>\n",
       "      <td>695.57</td>\n",
       "      <td>679.91</td>\n",
       "      <td>700.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2018-01-04</td>\n",
       "      <td>700.95</td>\n",
       "      <td>716.18</td>\n",
       "      <td>698.94</td>\n",
       "      <td>722.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2018-01-05</td>\n",
       "      <td>720.00</td>\n",
       "      <td>717.43</td>\n",
       "      <td>707.58</td>\n",
       "      <td>724.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2018-01-08</td>\n",
       "      <td>714.19</td>\n",
       "      <td>730.81</td>\n",
       "      <td>714.19</td>\n",
       "      <td>735.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2018-01-09</td>\n",
       "      <td>730.89</td>\n",
       "      <td>760.34</td>\n",
       "      <td>730.89</td>\n",
       "      <td>760.81</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2018-01-10</td>\n",
       "      <td>762.75</td>\n",
       "      <td>763.44</td>\n",
       "      <td>751.56</td>\n",
       "      <td>766.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2018-01-11</td>\n",
       "      <td>764.70</td>\n",
       "      <td>752.85</td>\n",
       "      <td>750.12</td>\n",
       "      <td>765.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2018-01-12</td>\n",
       "      <td>751.84</td>\n",
       "      <td>766.08</td>\n",
       "      <td>745.28</td>\n",
       "      <td>766.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2018-01-15</td>\n",
       "      <td>770.97</td>\n",
       "      <td>763.11</td>\n",
       "      <td>756.94</td>\n",
       "      <td>776.41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2018-01-16</td>\n",
       "      <td>758.36</td>\n",
       "      <td>751.03</td>\n",
       "      <td>746.23</td>\n",
       "      <td>766.26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2018-01-17</td>\n",
       "      <td>748.18</td>\n",
       "      <td>726.73</td>\n",
       "      <td>717.58</td>\n",
       "      <td>752.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2018-01-18</td>\n",
       "      <td>726.73</td>\n",
       "      <td>729.46</td>\n",
       "      <td>723.00</td>\n",
       "      <td>743.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2018-01-19</td>\n",
       "      <td>731.56</td>\n",
       "      <td>728.92</td>\n",
       "      <td>718.08</td>\n",
       "      <td>737.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2018-01-22</td>\n",
       "      <td>730.50</td>\n",
       "      <td>751.71</td>\n",
       "      <td>730.50</td>\n",
       "      <td>752.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2018-01-23</td>\n",
       "      <td>755.77</td>\n",
       "      <td>751.85</td>\n",
       "      <td>746.82</td>\n",
       "      <td>757.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2018-01-24</td>\n",
       "      <td>754.43</td>\n",
       "      <td>742.79</td>\n",
       "      <td>737.10</td>\n",
       "      <td>754.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2018-01-25</td>\n",
       "      <td>739.43</td>\n",
       "      <td>747.36</td>\n",
       "      <td>729.72</td>\n",
       "      <td>754.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2018-01-26</td>\n",
       "      <td>745.50</td>\n",
       "      <td>755.19</td>\n",
       "      <td>742.35</td>\n",
       "      <td>755.37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2018-01-29</td>\n",
       "      <td>756.69</td>\n",
       "      <td>715.45</td>\n",
       "      <td>714.17</td>\n",
       "      <td>757.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2018-01-30</td>\n",
       "      <td>715.14</td>\n",
       "      <td>721.05</td>\n",
       "      <td>709.33</td>\n",
       "      <td>727.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>718.06</td>\n",
       "      <td>742.87</td>\n",
       "      <td>718.06</td>\n",
       "      <td>749.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2018-02-01</td>\n",
       "      <td>745.26</td>\n",
       "      <td>736.26</td>\n",
       "      <td>731.58</td>\n",
       "      <td>745.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2018-02-02</td>\n",
       "      <td>730.90</td>\n",
       "      <td>719.42</td>\n",
       "      <td>704.45</td>\n",
       "      <td>731.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2018-02-05</td>\n",
       "      <td>706.61</td>\n",
       "      <td>697.87</td>\n",
       "      <td>685.60</td>\n",
       "      <td>709.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2018-02-06</td>\n",
       "      <td>683.08</td>\n",
       "      <td>688.77</td>\n",
       "      <td>683.08</td>\n",
       "      <td>702.12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2018-02-07</td>\n",
       "      <td>699.59</td>\n",
       "      <td>664.06</td>\n",
       "      <td>662.68</td>\n",
       "      <td>703.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2018-02-08</td>\n",
       "      <td>662.87</td>\n",
       "      <td>681.12</td>\n",
       "      <td>662.87</td>\n",
       "      <td>697.65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2018-02-09</td>\n",
       "      <td>660.73</td>\n",
       "      <td>664.06</td>\n",
       "      <td>639.35</td>\n",
       "      <td>670.34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2018-02-12</td>\n",
       "      <td>671.42</td>\n",
       "      <td>677.71</td>\n",
       "      <td>665.78</td>\n",
       "      <td>685.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>491</th>\n",
       "      <td>2020-01-08</td>\n",
       "      <td>1085.05</td>\n",
       "      <td>1088.14</td>\n",
       "      <td>1082.58</td>\n",
       "      <td>1095.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>492</th>\n",
       "      <td>2020-01-09</td>\n",
       "      <td>1094.00</td>\n",
       "      <td>1102.70</td>\n",
       "      <td>1090.00</td>\n",
       "      <td>1105.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>493</th>\n",
       "      <td>2020-01-10</td>\n",
       "      <td>1109.00</td>\n",
       "      <td>1112.50</td>\n",
       "      <td>1102.50</td>\n",
       "      <td>1115.99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>494</th>\n",
       "      <td>2020-01-13</td>\n",
       "      <td>1112.50</td>\n",
       "      <td>1124.27</td>\n",
       "      <td>1112.00</td>\n",
       "      <td>1129.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>495</th>\n",
       "      <td>2020-01-14</td>\n",
       "      <td>1124.20</td>\n",
       "      <td>1107.40</td>\n",
       "      <td>1103.00</td>\n",
       "      <td>1124.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>496</th>\n",
       "      <td>2020-01-15</td>\n",
       "      <td>1109.01</td>\n",
       "      <td>1112.13</td>\n",
       "      <td>1105.00</td>\n",
       "      <td>1121.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>497</th>\n",
       "      <td>2020-01-16</td>\n",
       "      <td>1118.87</td>\n",
       "      <td>1107.00</td>\n",
       "      <td>1102.58</td>\n",
       "      <td>1118.87</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>498</th>\n",
       "      <td>2020-01-17</td>\n",
       "      <td>1110.00</td>\n",
       "      <td>1107.50</td>\n",
       "      <td>1101.01</td>\n",
       "      <td>1112.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>499</th>\n",
       "      <td>2020-01-20</td>\n",
       "      <td>1111.86</td>\n",
       "      <td>1091.00</td>\n",
       "      <td>1082.00</td>\n",
       "      <td>1111.86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>500</th>\n",
       "      <td>2020-01-21</td>\n",
       "      <td>1081.00</td>\n",
       "      <td>1075.30</td>\n",
       "      <td>1072.30</td>\n",
       "      <td>1087.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>501</th>\n",
       "      <td>2020-01-22</td>\n",
       "      <td>1070.00</td>\n",
       "      <td>1075.51</td>\n",
       "      <td>1055.38</td>\n",
       "      <td>1084.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>502</th>\n",
       "      <td>2020-01-23</td>\n",
       "      <td>1076.00</td>\n",
       "      <td>1052.80</td>\n",
       "      <td>1037.00</td>\n",
       "      <td>1076.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>503</th>\n",
       "      <td>2020-02-03</td>\n",
       "      <td>985.00</td>\n",
       "      <td>1003.92</td>\n",
       "      <td>980.00</td>\n",
       "      <td>1010.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>504</th>\n",
       "      <td>2020-02-04</td>\n",
       "      <td>1015.00</td>\n",
       "      <td>1038.01</td>\n",
       "      <td>1011.01</td>\n",
       "      <td>1057.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>505</th>\n",
       "      <td>2020-02-05</td>\n",
       "      <td>1050.00</td>\n",
       "      <td>1049.99</td>\n",
       "      <td>1033.03</td>\n",
       "      <td>1054.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>506</th>\n",
       "      <td>2020-02-06</td>\n",
       "      <td>1059.43</td>\n",
       "      <td>1071.00</td>\n",
       "      <td>1052.02</td>\n",
       "      <td>1075.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>507</th>\n",
       "      <td>2020-02-07</td>\n",
       "      <td>1070.01</td>\n",
       "      <td>1076.00</td>\n",
       "      <td>1061.02</td>\n",
       "      <td>1077.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>508</th>\n",
       "      <td>2020-02-10</td>\n",
       "      <td>1062.00</td>\n",
       "      <td>1066.49</td>\n",
       "      <td>1057.20</td>\n",
       "      <td>1074.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>509</th>\n",
       "      <td>2020-02-11</td>\n",
       "      <td>1063.00</td>\n",
       "      <td>1098.00</td>\n",
       "      <td>1062.80</td>\n",
       "      <td>1099.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>510</th>\n",
       "      <td>2020-02-12</td>\n",
       "      <td>1089.00</td>\n",
       "      <td>1097.27</td>\n",
       "      <td>1085.88</td>\n",
       "      <td>1098.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>511</th>\n",
       "      <td>2020-02-13</td>\n",
       "      <td>1098.00</td>\n",
       "      <td>1091.00</td>\n",
       "      <td>1088.01</td>\n",
       "      <td>1113.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>512</th>\n",
       "      <td>2020-02-14</td>\n",
       "      <td>1090.45</td>\n",
       "      <td>1088.00</td>\n",
       "      <td>1083.11</td>\n",
       "      <td>1093.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>513</th>\n",
       "      <td>2020-02-17</td>\n",
       "      <td>1082.50</td>\n",
       "      <td>1093.82</td>\n",
       "      <td>1082.40</td>\n",
       "      <td>1096.19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>514</th>\n",
       "      <td>2020-02-18</td>\n",
       "      <td>1090.01</td>\n",
       "      <td>1084.00</td>\n",
       "      <td>1083.00</td>\n",
       "      <td>1096.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>515</th>\n",
       "      <td>2020-02-19</td>\n",
       "      <td>1085.00</td>\n",
       "      <td>1096.50</td>\n",
       "      <td>1078.00</td>\n",
       "      <td>1101.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>516</th>\n",
       "      <td>2020-02-20</td>\n",
       "      <td>1096.70</td>\n",
       "      <td>1118.00</td>\n",
       "      <td>1095.41</td>\n",
       "      <td>1124.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>517</th>\n",
       "      <td>2020-02-21</td>\n",
       "      <td>1111.46</td>\n",
       "      <td>1112.88</td>\n",
       "      <td>1110.01</td>\n",
       "      <td>1123.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>518</th>\n",
       "      <td>2020-02-24</td>\n",
       "      <td>1105.50</td>\n",
       "      <td>1087.18</td>\n",
       "      <td>1085.50</td>\n",
       "      <td>1110.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>519</th>\n",
       "      <td>2020-02-25</td>\n",
       "      <td>1078.00</td>\n",
       "      <td>1074.81</td>\n",
       "      <td>1067.88</td>\n",
       "      <td>1082.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>520</th>\n",
       "      <td>2020-02-26</td>\n",
       "      <td>1062.00</td>\n",
       "      <td>1073.70</td>\n",
       "      <td>1055.00</td>\n",
       "      <td>1084.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>521 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Unnamed: 0     open    close      low     high\n",
       "0    2018-01-02   680.16   683.90   670.34   690.03\n",
       "1    2018-01-03   681.62   695.57   679.91   700.95\n",
       "2    2018-01-04   700.95   716.18   698.94   722.43\n",
       "3    2018-01-05   720.00   717.43   707.58   724.89\n",
       "4    2018-01-08   714.19   730.81   714.19   735.06\n",
       "5    2018-01-09   730.89   760.34   730.89   760.81\n",
       "6    2018-01-10   762.75   763.44   751.56   766.52\n",
       "7    2018-01-11   764.70   752.85   750.12   765.67\n",
       "8    2018-01-12   751.84   766.08   745.28   766.44\n",
       "9    2018-01-15   770.97   763.11   756.94   776.41\n",
       "10   2018-01-16   758.36   751.03   746.23   766.26\n",
       "11   2018-01-17   748.18   726.73   717.58   752.06\n",
       "12   2018-01-18   726.73   729.46   723.00   743.32\n",
       "13   2018-01-19   731.56   728.92   718.08   737.39\n",
       "14   2018-01-22   730.50   751.71   730.50   752.06\n",
       "15   2018-01-23   755.77   751.85   746.82   757.89\n",
       "16   2018-01-24   754.43   742.79   737.10   754.45\n",
       "17   2018-01-25   739.43   747.36   729.72   754.01\n",
       "18   2018-01-26   745.50   755.19   742.35   755.37\n",
       "19   2018-01-29   756.69   715.45   714.17   757.57\n",
       "20   2018-01-30   715.14   721.05   709.33   727.55\n",
       "21   2018-01-31   718.06   742.87   718.06   749.84\n",
       "22   2018-02-01   745.26   736.26   731.58   745.55\n",
       "23   2018-02-02   730.90   719.42   704.45   731.88\n",
       "24   2018-02-05   706.61   697.87   685.60   709.27\n",
       "25   2018-02-06   683.08   688.77   683.08   702.12\n",
       "26   2018-02-07   699.59   664.06   662.68   703.36\n",
       "27   2018-02-08   662.87   681.12   662.87   697.65\n",
       "28   2018-02-09   660.73   664.06   639.35   670.34\n",
       "29   2018-02-12   671.42   677.71   665.78   685.51\n",
       "..          ...      ...      ...      ...      ...\n",
       "491  2020-01-08  1085.05  1088.14  1082.58  1095.50\n",
       "492  2020-01-09  1094.00  1102.70  1090.00  1105.39\n",
       "493  2020-01-10  1109.00  1112.50  1102.50  1115.99\n",
       "494  2020-01-13  1112.50  1124.27  1112.00  1129.20\n",
       "495  2020-01-14  1124.20  1107.40  1103.00  1124.89\n",
       "496  2020-01-15  1109.01  1112.13  1105.00  1121.60\n",
       "497  2020-01-16  1118.87  1107.00  1102.58  1118.87\n",
       "498  2020-01-17  1110.00  1107.50  1101.01  1112.78\n",
       "499  2020-01-20  1111.86  1091.00  1082.00  1111.86\n",
       "500  2020-01-21  1081.00  1075.30  1072.30  1087.00\n",
       "501  2020-01-22  1070.00  1075.51  1055.38  1084.00\n",
       "502  2020-01-23  1076.00  1052.80  1037.00  1076.00\n",
       "503  2020-02-03   985.00  1003.92   980.00  1010.68\n",
       "504  2020-02-04  1015.00  1038.01  1011.01  1057.00\n",
       "505  2020-02-05  1050.00  1049.99  1033.03  1054.00\n",
       "506  2020-02-06  1059.43  1071.00  1052.02  1075.00\n",
       "507  2020-02-07  1070.01  1076.00  1061.02  1077.00\n",
       "508  2020-02-10  1062.00  1066.49  1057.20  1074.60\n",
       "509  2020-02-11  1063.00  1098.00  1062.80  1099.68\n",
       "510  2020-02-12  1089.00  1097.27  1085.88  1098.79\n",
       "511  2020-02-13  1098.00  1091.00  1088.01  1113.89\n",
       "512  2020-02-14  1090.45  1088.00  1083.11  1093.51\n",
       "513  2020-02-17  1082.50  1093.82  1082.40  1096.19\n",
       "514  2020-02-18  1090.01  1084.00  1083.00  1096.88\n",
       "515  2020-02-19  1085.00  1096.50  1078.00  1101.50\n",
       "516  2020-02-20  1096.70  1118.00  1095.41  1124.00\n",
       "517  2020-02-21  1111.46  1112.88  1110.01  1123.54\n",
       "518  2020-02-24  1105.50  1087.18  1085.50  1110.00\n",
       "519  2020-02-25  1078.00  1074.81  1067.88  1082.09\n",
       "520  2020-02-26  1062.00  1073.70  1055.00  1084.00\n",
       "\n",
       "[521 rows x 5 columns]"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv('GZMTprice.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "保存写入csv文件："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "df.to_csv('GZMTprice.csv')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "pycharm": {
   "stem_cell": {
    "cell_type": "raw",
    "metadata": {
     "collapsed": false
    },
    "source": []
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
